from django.db import models
from utils.models import BaseModel
# Create your models here.


class Banner(BaseModel):
    title = models.CharField(max_length=64, verbose_name='标题')
    link = models.CharField(max_length=64,verbose_name='链接')
    img = models.ImageField(upload_to='banner',verbose_name='图片链接')
    info = models.TextField(verbose_name='轮播图显示')
    order_by = models.IntegerField(verbose_name='显示顺序')

    class Meta:
        verbose_name_plural='轮播图表'

    def __str__(self):
        return self.title
